
** main
cd /N/project/covidTests/covidTests

adopath +scripts/ado
set more off
set seed 19

* clean census data  and death data - very simple
do scripts/age_sex_counts
do scripts/import_ili_cli
do scripts/import_state_counts

* clean up data sets 
do scripts/clean_dxccsr
do scripts/clean_tests
do scripts/clean_dx
do scripts/clean_inp
do scripts/clean_demo

** check sum for future validation
do scripts/check_sums

* summarize demographics (table 1) and hospital age dist (table a7)
do scripts/sum_demo 
do scripts/inp_group_age

** timing of hospital tests (Appendix Figure)
do scripts/show_hospital_test_times

** weekly testing rates 
do scripts/weekly_test_rates_wtd
do scripts/weekly_test_rates

** weekly bounds and bootstrap confidence intervals 
do scripts/bootstrap_bounds
do scripts/calculate_bs_ci
do scripts/plot_bounds 
do scripts/width_bounds
do scripts/outsheet_bounds

do scripts/show_small_bias

do scripts/bootstrap_bounds_unwtd
do scripts/calculate_bs_ci_unwtd
do scripts/outsheet_bounds_unwtd

** bounds by cause of hospitalizations, + bootstrap CI
do scripts/bootstrap_causes
do scripts/table_narrow_causes

** retest rates, etc.
do scripts/study_retests

** validity checks
do scripts/community_rate_validation
do scripts/prior_rate_validation.do

** comparison to state testing rates 
do scripts/compare_to_state


** ICLI share of hospitalized patients and of pop
do scripts/icli_hosps_pop

* share share of tested pats are hospitalized pats? 
do scripts/hospital_test_share

